import { createRouter, createWebHistory } from "vue-router";

const routes = [
  {
    path: "/",
    name: "Home",
    component: () => import("@/views/home/index.vue"), // 引入布局组件
    children: [
      {
        name: "AIChat",
        path: "AIChat",
        component: () => import("@/views/AIChat/index.vue"),
      },
      {
        name: "RuleBase",
        path: "ruleBase",
        component: () => import("@/views/ruleBase/index.vue"),
      },
      {
        name: "MaterialQualityTest",
        path: "materialQualityTest",
        component: () => import("@/views/materialQualityTest/index.vue"),
      },
      {
        name: "QualityTestTable",
        path: "qualityTestTable",
        component: () =>
          import("@/views/materialQualityTest/components/qualityTestTable.vue"),
      },
      {
        name: "QualityTestRepeat",
        path: "qualityTestRepeat",
        component: () =>
          import(
            "@/views/materialQualityTest/components/qualityTestRepeat.vue"
          ),
      },
      {
        name: "QualityTestDetails",
        path: "qualityTestDetails",
        component: () =>
          import(
            "@/views/materialQualityTest/components/qualityTestDetails.vue"
          ),
      },
      {
        name: "MaterialQualityDetails",
        path: "materialQualityDetails",
        component: () => import("@/views/materialQualityDetails/index.vue"),
      },
      {
        name: "KnowledgeBase",
        path: "knowledgeBase",
        component: () => import("@/views/knowledgeBase/index.vue"),
      },
      {
        name: "NormativeEntry",
        path: "normativeEntry",
        component: () => import("@/views/normativeEntry/index.vue"),
      },
      {
        name: "AuthorityFile",
        path: "authorityFile",
        component: () => import("@/views/authorityFile/index.vue"),//规范文件
      },
    ],
  },
];

const router = createRouter({
  history: createWebHistory(),
  routes,
});

export default router;
